import { _decorator, Component, Node } from "cc";
const { ccclass, property } = _decorator;

@ccclass("Circle")
export class Circle extends Component {
  public rotateSpeed: number = 90;

  private isRotate: boolean = true;

  start() {}

  update(deltaTime: number) {
    if (!this.isRotate) return;
    this.node.angle -= this.rotateSpeed * deltaTime;
  }

  public stopRotate() {
    this.isRotate = false;
  }
}
